package cn.ren.controller;

import cn.ren.entity.PageResult;
import cn.ren.entity.QueryPageBean;
import cn.ren.entity.Result;
import cn.ren.pojo.LZOrderShow;
import cn.ren.pojo.Permission;
import cn.ren.service.LZOrderShowService;
import cn.ren.service.LZPermissionService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/lzPermission")
public class LZPermissionController {
    @Reference
    LZPermissionService lzPermissionService;
    @RequestMapping("/findPage")
    public PageResult findPage(@RequestBody QueryPageBean queryPageBean){
        Integer currentPage = queryPageBean.getCurrentPage();
        Integer pageSize = queryPageBean.getPageSize();
        String queryString = queryPageBean.getQueryString();
        return lzPermissionService.queryPage(currentPage,pageSize,queryString);

    }
    @RequestMapping("/add")
    public Result add(@RequestBody Permission permission){
            return  lzPermissionService.add(permission);

    }
}
